package comp.style.state
{
	
	import flash.text.TextField;
	
	public class TextColor implements Istate
	{
		public function TextColor(tf:TextField,color:uint=NaN,defaulColor:uint=NaN)
		{
			this._color=color;
			this._tf=tf;
			if(!isNaN(defaulColor) &&  isNaN(color))
				this._color=defaulColor;
		}
		
		public function get stateName():String
		{
			return null;
		}
		
		public function set stateName(value:String):void
		{
			
		}
		
		public function get state():int
		{
			return _state;
		}
		
		public function set state(value:int):void
		{
			_state=value;
		}
		
		public function create():void
		{
			
		}
		
		/**
		* 执行状态逻辑
		*/
		public	function doState(label:*):*
		{
//			_tf.filters=[];
			_tf.textColor=_color;
		}
			
		/**
		 * 退出状态
		 */
		public function canelState(par:*):*
		{
			
		}
		
		private var _state:int=0;
		private var _color:uint;
		private var _tf:TextField;
	}
}